package com.example.duomeitijuhe.others;

import android.app.Activity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Michael on 2014/10/12.
 */
public class ActivityCollector {

    public static List<Activity> activityList = new ArrayList<Activity>();

    public static void addActivity(Activity activity){
        activityList.add(activity);
    }

    public static void removeActivity(Activity activity){
        activityList.remove(activity);
    }

    public static void finishAll(){
        for(Activity activity : activityList){
            activity.finish();
        }
    }
}

